﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OcmKeep.entity
{
    class BrackeMachine
    {
        public string Direct = "out";
        public bool Dbing = false;
        public bool DbingIn = false;
        public bool DbingOut = false;
        public bool Busing = false;
        public bool CFErrorFlag = false;
        public int DevNo = 0;
        public int state = 0;//0:无请求 3:完成
        public Dictionary<string, object> InSwipe = null;
        public Dictionary<string, object> OutSwipe = null;
        public bool Valid = false;
        public bool FaceComparing = false;
        public long startTime = 0;//人脸比对时间
        public bool FaceRes = false;//人脸比对结果
        public byte[] OrgFeature=null;
        public string OldCardNo = "";
        public int FaceErrorNum = 0;
        public byte[] Package { get; set; }
        public string CardNo = "";
        private int trynum = 2;
        public void FaceCompareOver()
        {
            FaceRes = false;
        }

        public bool IsDecable()
        {
            if (trynum > 0) return true;
            else return false;
        }
        public void NewTry() { trynum = 2; }
        public void DecTry()
        {
            this.trynum--;
        }
    }
}
